<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const arr1 =[1,2,3]
        const arr2 = [2,3,5]
     //交集
     const result = arr1.filter((item) => arr2.includes(item))
     console.log(result)
     //并集
     const result1 = [...new Set([...arr1,...arr2])]
     console.log(result1)
     //差集
     const result3 = arr2.filter((item) => !arr1.includes(item))
     console.log(result3)
    </script>
</body>
</html>